package cn.skyquant.quant4j.task.boot.entity;


import com.google.common.base.MoreObjects;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 用户
 * Created by harley-dog on 2016/5/12.
 */public class User implements Serializable{
    private static final long serialVersionUID = 1L;
    public Integer id;
    public String name;
    public String tel;
    public String password;
    public Date gmtLastLogin;
    public String token;

    public User(){
    }

    public User(Integer id){
        this.id = id;
    }
    public User(String s){
        this.name = s;
        this.tel = s;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof User)) return false;
        User user = (User) o;
        return Objects.equals(name, user.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }

    @Override
    public String toString() {
        return MoreObjects.toStringHelper(this)
                .add("id", id)
                .add("tel", tel)
                .toString();
    }
}
